package com.zpdhy.system.service.impl;

import com.zpdhy.service.impl.BaseServiceImpl;
import com.zpdhy.system.model.UserInfo;
import com.zpdhy.system.repository.SysPermissionRepository;
import com.zpdhy.system.repository.UserInfoRepository;
import com.zpdhy.system.service.UserInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * Created by kedong on 2016/12/30.
 */
@Service
public class UserInfoServiceImpl extends BaseServiceImpl<UserInfo, Long> implements UserInfoService {

    @Resource
    private UserInfoRepository userInfoRepository;

    @Autowired
    public void setRepository(UserInfoRepository userInfoRepository) {
        super.setRepository(userInfoRepository);
    }

    @Override
    public UserInfo findByUsername(String userName) {
        return userInfoRepository.findByUserName(userName);
    }
}
